/*!
 * Copyright (C) 2020 - All Rights Reserved by
 * @author : ZhaoYanbo
 * @email  : zyb920@hotmail.com
 * @created: 2020-10-31
 * @version: 1.0.0.0
 *
 */

#ifndef AUDIODECODER_H
#define AUDIODECODER_H

#include <QThread>

struct AVCodecContext;
struct AVPacket;
struct AVFrame;
class OpenALEngine;


class AudioDecoder : public QThread
{
    Q_OBJECT
public:
    AudioDecoder(QObject *p = nullptr);
    ~AudioDecoder() override;

    void play(const QString &file);

    void stop();

protected:
    void run() override;

private:
    OpenALEngine *engine = nullptr;
    QString m_file;
};

#endif // AUDIODECODER_H
